﻿<Window x:Class="AW.LLBLGen.DataContextDriver.Static.ConnectionDialog"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		Title="LLBLGen Pro 2.6 Connection"
		Background="{x:Static SystemColors.ControlBrush}" Width="489" 
		WindowStartupLocation="CenterScreen" Height="470" MaxHeight="470" MinHeight="400" MinWidth="300">
		<StackPanel Margin="7" MinHeight="0" Height="410">

				<DockPanel>
						<Label DockPanel.Dock="Right" Padding="1">
								<Hyperlink Click="BrowseAssembly">Browse...</Hyperlink>
						</Label>
						<Label Padding="0,0,0,1" Content="Path to LLBL assembly containing a ILinqMetaData:"></Label>
				</DockPanel>

				<TextBox Name="txtAssemblyPath" Margin="0,0,0,6" Text="{Binding CustomTypeInfo.CustomAssemblyPath}"/>

				<DockPanel>
						<Label DockPanel.Dock="Right" Padding="1">
								<Hyperlink Click="ChooseType">Choose...</Hyperlink>
						</Label>
						<Label Padding="0,0,0,1">Full name of LinqMetaData type:</Label>
				</DockPanel>

				<TextBox Name="txtTypeName" Margin="0,0,0,6" Text="{Binding CustomTypeInfo.CustomTypeName}"/>

				<DockPanel>
						<Label DockPanel.Dock="Right" Padding="1">
								<Hyperlink Click="BrowseAppConfig">Browse...</Hyperlink>
						</Label>
						<Label Padding="0,0,0,1">Application config file (if required):</Label>
				</DockPanel>

				<TextBox Name="txtAppConfigPath" Text="{Binding AppConfigPath}"/>
			
				<DockPanel>
			<Label Padding="0,0,0,1" >Database Provider (or dataAccessAdapter factory method) (if required):</Label>
				</DockPanel>
				<TextBox Name="comboBoxDatabaseProvider" Margin="0,0,0,6" Text="{Binding DatabaseInfo.Provider}"  />

			<DockPanel>
				<Label Padding="0,0,0,1" >Database connection string (if required):</Label>
			</DockPanel>
			<TextBox Name="textBoxDatabaseConnectionString" Margin="0,0,0,6" Text="{Binding DatabaseInfo.CustomCxString}"  />

		<DockPanel>

				<Label DockPanel.Dock="Right" Padding="1" >
						<Hyperlink Click="BrowseDataAccessAdapterAssembly">Browse...</Hyperlink>
				</Label>
			<Label Padding="0,0,0,1">Path to DataAccessAdapter (or dataAccessAdapter factory) assembly:</Label>
				</DockPanel>
				<TextBox  Name="textBoxDataAccessAdapterAssemblyPath" Margin="0,0,0,6" Text="{Binding CustomTypeInfo.CustomMetadataPath}"  />
				<DockPanel>
						<Label DockPanel.Dock="Right" Padding="1">
								<Hyperlink Click="ChooseAdapter">Choose...</Hyperlink>
						</Label>
			<Label Padding="0,0,0,1">Full name of adapter (or dataAccessAdapter factory) type:</Label>
				</DockPanel>
				<TextBox  Name="textBoxAdapterType" Text="{Binding DatabaseInfo.DbVersion}"  />

		<DockPanel>
			<Label Padding="0,0,0,1" >Connection Display Name (Optional):</Label>
		</DockPanel>
		<TextBox Name="textBoxConnectionDisplayName" Margin="0,0,0,6" Text="{Binding CustomTypeInfo.DisplayName}"  />

		<CheckBox IsChecked="{Binding Persist}">Remember this connection</CheckBox>

				<DockPanel LastChildFill="False" Margin="0,10,0,0">
						<Button Name="btnCancel" DockPanel.Dock="Right" Content="Cancel" Margin="5,0,0,0" Padding="8,2" MinWidth="60" IsCancel="True" TabIndex="2" />
						<Button Name="btnOK" DockPanel.Dock="Right" Content="OK" Margin="5,0,0,0" Padding="8,2" MinWidth="60" IsDefault="True" TabIndex="1" Click="btnOK_Click" />
			<Button Name="btnSaveDefault" DockPanel.Dock="Left" Content="Save as default" Margin="5,0,0,0" Padding="8,2" MinWidth="60" IsDefault="True" TabIndex="1" Click="btnSaveDefault_Click" />
		</DockPanel>
		</StackPanel>
</Window>
